<include file="public@admin_head" />
</head>
<body>
    <div class="wrap js-check-wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a href="{:url('AdminAsset/index')}">{:lang('USER_ADMINASSET_INDEX')}</a></li>
        </ul>
        <php>$status=['不可用', '可用'];</php>
        <table class="table table-hover table-bordered margin-top-20">
            <thead>
                <tr>
                    <th width="50">ID</th>
                    <th>用户</th>
                    <th>图像</th>
                    <th>文件路径</th>
                    <th>上传时间</th>
                    <th width="60">{:lang('ACTIONS')}</th>
                </tr>
            </thead>
            <tbody>
                <php>
                    $asset_img_suffixes=['bmp','jpg','jpeg','png','gif','tiff'];/*TODO ADD MORE*/
                </php>
                <foreach name="assets" item="vo">
                    <tr>
                        <td>{$vo.id}</td>
                        <td>
                            ID:{$vo.user_id} 账户:{$vo.user_login} 昵称:{$vo.user_nickname}
                        </td>
                        <td>
                            <if condition="in_array(strtolower($vo['suffix']),$asset_img_suffixes)">
                                <a
                                    href="javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($vo['url'])}');">
                                    <i class="fa fa-photo fa-fw"></i>
                                </a>
                            </if>
                        </td>
                        <td>
                            <a href="{$vo.url}" target="_blank">{$vo.url}</a>
                            <if condition="!$vo['exist']">
                                <span style='color:red;'>&nbsp;&nbsp(文件丢失)</span>
                            </if>
                        </td>
                        <td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
                        <td>
                            <a class="btn btn-xs btn-danger js-ajax-delete" href="javascript:"
                                data-href="{:cmf_plugin_url('DferThinkcmfTools://AdminAsset/delete/',['id'=>$vo['id']])}"
                                title="{:lang('DELETE')}" data-toggle="tooltip">
                                <i class="fa fa-trash fa-fw"></i>
                            </a>
                        </td>
                    </tr>
                </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page|default=''}</div>
    </div>
    <script src="__STATIC__/js/admin.js?v={$_static_version}"></script>
</body>
</html>